package com.gzdh.tang.dishrecognition.model;

import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

@Data
public class PayModelReq {

    //授权口令
    private String auth;

    //支付方式
    private int payWay;

    //消费类型
    private int sc;

    //机号
    private String deviceId;

    //操作员编号
    private String userId;

    private Date czrq;

    private String faceToken;

    private String aliUid;

    private String terminal_params;

    private String orders;

    private Boolean ignoreException;

    //购物车状态
    private List<WeekMenuBakModelReq> productCartModelList;


    public BigDecimal getAmountPriceSum() {
        BigDecimal price = new BigDecimal(0);
        for (WeekMenuBakModelReq goo : productCartModelList) {
            price = price.add(new BigDecimal(goo.getNumber()).multiply(new BigDecimal(goo.getPrice())));
        }
        return price;
    }

}
